Skip to content

Revise file/attachment exception handling#6949

Merged
labkey-nicka merged 1 commit intodevelopfrom
fb_file_convert_exceptions
Aug 20, 2025
Merged

Revise file/attachment exception handling#6949
labkey-nicka merged 1 commit intodevelopfrom
fb_file_convert_exceptions

Conversation

@labkey-nicka
Copy link
Contributor

@labkey-nicka labkey-nicka commented Aug 20, 2025

Rationale

This addresses several test failures due to changes in #6941 which resulted in different, albeit desired, conversion exception handling of file/attachment fields.

Related Pull Requests

Changes

  • Revise AttachmentDataIterator to give more informative error in non-string value case.
  • Assimilate BatchValidationException handling when creating a run 😿.

catch (ConvertHelper.FileConversionException e)
{
throw new ApiUsageException(e);
errors.add(new PropertyValidationError(e.getMessage(), pd.getName()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this result in inconsistent error msg for FileLink? Can we just do errors.add(e.gerMessage())?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into the exact place and its trivial to handle in a similar manner BUT it causes the exception chaining that we're trying to avoid with those ApiUsageException opt-outs. I'm going to investigate a better way so we could do this.

In the meantime, I plan on merging these changes as-is assuming test runs look good.

@labkey-nicka labkey-nicka merged commit 9e49f3c into develop Aug 20, 2025
21 of 23 checks passed
@labkey-nicka labkey-nicka deleted the fb_file_convert_exceptions branch August 20, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants